package com.gdkj.enums;

public enum WolfKillRoleEnums {
    WOLF_MAN(1, "狼"),
    VILLAGER(2, "民"),
    PROPHET(3, "预"),
    WITCH(4, "女"),
    HUNTER(5, "猎");

    private Integer role;

    private String name;

    WolfKillRoleEnums(Integer role, String name) {
        this.role = role;
        this.name = name;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByRole(final Integer role) {
        for (WolfKillRoleEnums roleEnum : WolfKillRoleEnums.values()) {
            if (roleEnum.getRole().equals(role)) {
                return roleEnum.getName();
            }
        }
        return "";
    }
}
